# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=python-dfwinreg
pkgname=('python2-dfwinreg' 'python-dfwinreg')
_pkgname=dfwinreg
pkgver=20240229
pkgrel=2
pkgdesc='Digital Forensics Windows Registry.'
arch=('any')
url='https://pypi.org/project/dfwinreg/#files'
license=('Apache')
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('d54a9f66c855ce7ea5be5914fbded41e0fe39f668dda2f133e5ec9d4b0e321c5ed2b1b00386d8e8dde53dd0227e74ba1a922c3da2928a5e44471681d6de5fa25')

package_python2-dfwinreg() {
  depends=('python2')

  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1

  mv $pkgdir/usr/share/doc/dfwinreg{,2}
}

package_python-dfwinreg() {
  depends=('python')

  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1
}

